/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.front.entity;

import java.util.Date;

import org.hibernate.validator.constraints.Length;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.thinkgem.jeesite.common.config.Global;
import com.thinkgem.jeesite.common.persistence.DataEntity;
import com.thinkgem.jeesite.common.utils.excel.annotation.ExcelField;

/**
 * 用户管理Entity
 * @author 朱俊吉
 * @version 2017-11-25
 */
public class FrontUser extends DataEntity<FrontUser> {
	
	private static final long serialVersionUID = 1L;
	private String name;		// 姓名
	private String sex;		// 性别
	private String phoneNum;		// 电话号码
	private String address;		// 地址
	private String mail;		// 邮箱
	private String provinceId;		// 省份
	private String school;		// 毕业学校
	private String artsScience;		// 文理科
	private String grade;		// 成绩
	private String account;		// 账号
	private String password;		// 密码
	private String graduateYear;		// 毕业年份
	private String loginFlag;		// 启用标记1表示启用，0停用
	private String vipFlag;		// 会员标志
	private String vip;		// 会员号
	private String vipCard;		// 会员卡号
	private String beginGrade;		// 开始 成绩
	private String endGrade;		// 结束 成绩
	private String beginGraduateYear;		// 开始 毕业年份
	private String endGraduateYear;		// 结束 毕业年份
	private String loginIp;			//最后登陆IP
	private Date loginDate;		//最后登陆时间
	private String photo;			//头像
	
	
	private String oldAccount;		//旧账号
	private String newPassword; 	//新密码
	private String OldLoginIp;		//上次登陆IP
	private Date OldLoginDate;	//上次登陆时间

	
	public FrontUser() {
		super();
		this.loginFlag = Global.YES;
	}

	public FrontUser(String id){
		super(id);
	}
	
	public FrontUser(String id, String account){
		super(id);
		this.account = account;
	}

	@Length(min=1, max=100, message="姓名长度必须介于 1 和 100 之间")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Length(min=1, max=1, message="性别长度必须介于 1 和 1 之间")
	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}
	
	@Length(min=1, max=13, message="电话号码长度必须介于 1 和 13 之间")
	public String getPhoneNum() {
		return phoneNum;
	}

	public void setPhoneNum(String phoneNum) {
		this.phoneNum = phoneNum;
	}
	
	@Length(min=0, max=255, message="地址长度必须介于 0 和 255 之间")
	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}
	
	@Length(min=0, max=100, message="邮箱长度必须介于 0 和 100 之间")
	public String getMail() {
		return mail;
	}

	public void setMail(String mail) {
		this.mail = mail;
	}
	
	@Length(min=1, max=64, message="省份长度必须介于 1 和 64 之间")
	public String getProvinceId() {
		return provinceId;
	}

	public void setProvinceId(String provinceId) {
		this.provinceId = provinceId;
	}
	
	@Length(min=1, max=100, message="毕业学校长度必须介于 1 和 100 之间")
	public String getSchool() {
		return school;
	}

	public void setSchool(String school) {
		this.school = school;
	}
	
	@Length(min=1, max=1, message="文理科长度必须介于 1 和 1 之间")
	public String getArtsScience() {
		return artsScience;
	}

	public void setArtsScience(String artsScience) {
		this.artsScience = artsScience;
	}
	
	public String getGrade() {
		return grade;
	}

	public void setGrade(String grade) {
		this.grade = grade;
	}
	
	@Length(min=1, max=100, message="账号长度必须介于 1 和 100 之间")
	public String getAccount() {
		return account;
	}

	public void setAccount(String account) {
		this.account = account;
	}
	
	@Length(min=1, max=100, message="密码长度必须介于 1 和 100 之间")
	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}
	
	@Length(min=1, max=6, message="毕业年份长度必须介于 1 和 6 之间")
	public String getGraduateYear() {
		return graduateYear;
	}

	public void setGraduateYear(String graduateYear) {
		this.graduateYear = graduateYear;
	}
	
	@Length(min=0, max=1, message="会员标志长度必须介于 0 和 1 之间")
	public String getVipFlag() {
		return vipFlag;
	}

	public void setVipFlag(String vipFlag) {
		this.vipFlag = vipFlag;
	}
	
	@Length(min=0, max=64, message="会员号长度必须介于 0 和 64 之间")
	public String getVip() {
		return vip;
	}

	public void setVip(String vip) {
		this.vip = vip;
	}
	
	@Length(min=0, max=64, message="会员卡号长度必须介于 0 和 64 之间")
	public String getVipCard() {
		return vipCard;
	}

	public void setVipCard(String vipCard) {
		this.vipCard = vipCard;
	}
	
	@Length(min=0, max=1, message="启用标志长度必须介于 0 和 64 之间")
	public String getLoginFlag() {
		return loginFlag;
	}

	public void setLoginFlag(String loginFlag) {
		this.loginFlag = loginFlag;
	}

	@ExcelField(title="最后登录IP", type=1, align=1, sort=100)
	public String getLoginIp() {
		return loginIp;
	}

	public void setLoginIp(String loginIp) {
		this.loginIp = loginIp;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelField(title="最后登录日期", type=1, align=1, sort=110)
	public Date getLoginDate() {
		return loginDate;
	}

	public void setLoginDate(Date loginDate) {
		this.loginDate = loginDate;
	}

	public String getPhoto() {
		return photo;
	}

	public void setPhoto(String photo) {
		this.photo = photo;
	}

	public String getBeginGrade() {
		return beginGrade;
	}

	public void setBeginGrade(String beginGrade) {
		this.beginGrade = beginGrade;
	}
	
	public String getEndGrade() {
		return endGrade;
	}

	public void setEndGrade(String endGrade) {
		this.endGrade = endGrade;
	}
		
	public String getBeginGraduateYear() {
		return beginGraduateYear;
	}

	public void setBeginGraduateYear(String beginGraduateYear) {
		this.beginGraduateYear = beginGraduateYear;
	}
	
	public String getEndGraduateYear() {
		return endGraduateYear;
	}

	public void setEndGraduateYear(String endGraduateYear) {
		this.endGraduateYear = endGraduateYear;
	}

	public String getOldAccount() {
		return oldAccount;
	}

	public void setOldAccount(String oldAccount) {
		this.oldAccount = oldAccount;
	}

	public String getNewPassword() {
		return newPassword;
	}

	public void setNewPassword(String newPassword) {
		this.newPassword = newPassword;
	}

	public String getOldLoginIp() {
		return OldLoginIp;
	}

	public void setOldLoginIp(String oldLoginIp) {
		OldLoginIp = oldLoginIp;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getOldLoginDate() {
		return OldLoginDate;
	}

	public void setOldLoginDate(Date oldLoginDate) {
		OldLoginDate = oldLoginDate;
	}
	
}